package com.qf.service.impl;

import com.qf.dao.Impl.UserDaoImpl;
import com.qf.dao.UserDao;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * Create by 周志豪 on 2022/8/26  17:15
 *
 * @authoe 周志豪
 * @veision 1.0
 * //TODO  想好了再去做
 * @since 1.0
 */
@Component//Spring来创建这个对象。repository是别名
public class UserServiceImpl implements UserService {
    private UserDao userDao=new UserDaoImpl();

    @Autowired//自动装配
    public void setUserDao(UserDao userDao){
        this.userDao=userDao;
    }


    @Override
    public void adduser() {

        userDao.addUser();
        System.out.println("UserServiceImpl中的adduser方法执行了！");
    }
}
